import fetch from '@/utils/network/fetch'

const getRoles = (objc) => {
    fetch('/api/role', objc)
}

const addRole = (objc) => {
    fetch('/api/role', objc)
}

const removeRole = (objc) => {
    fetch('/api/role/deletion', objc)
}

const editRole = (objc) => {
    fetch(`/api/role/${objc.data.id}`, objc)
}

const getAuthorities = (objc) => {
    fetch('/api/role/authorities', objc)
}

export default {
    getRoles,
    addRole,
    removeRole,
    editRole,
    getAuthorities
}